package com.glsc.ngateway.common.xir.domain;

import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;

@Data
@Entity
@Table(name = "XIR_TRD.TTRD_OTC_TRADE")
public class TtrdOtcTrade implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 委托日期
     */
    @Column(name = "ORDDATE", nullable = false)
    private String orddate;

    /**
     * 委托时间
     */
    @Column(name = "ORDTIME", nullable = false)
    private String ordtime;

    /**
     * 确认日期
     */
    @Column(name = "CONDATE")
    private String condate;

    /**
     * 确认时间
     */
    @Column(name = "CONTIME")
    private String contime;

    /**
     * 交易序号
     */
    @Id
    @Column(name = "SYSORDID", nullable = false)
    private String sysordid;

    /**
     * 指令号
     */
    @Column(name = "INSID", nullable = false)
    private String insid;

    /**
     * 内部交易号
     */
    @Column(name = "INTORDID", nullable = false)
    private String intordid;

    /**
     * 外部交易号
     */
    @Column(name = "EXTORDID")
    private String extordid;

    /**
     * 客户交易号
     */
    @Column(name = "CUSTORDID")
    private String custordid;

    /**
     * 外部业务编号
     */
    @Column(name = "EXTBIZID")
    private String extbizid;

    /**
     * 操作人
     */
    @Column(name = "OPERATOR", nullable = false)
    private String operator;

    /**
     * 交易类别
     */
    @Column(name = "TRDTYPE", nullable = false)
    private String trdtype;

    /**
     * 一级资金账户
     */
    @Column(name = "CASH_EXT_ACCID", nullable = false)
    private String cashExtAccid;

    /**
     * 二级资金账户
     */
    @Column(name = "CASH_ACCID", nullable = false)
    private String cashAccid;

    /**
     * 一级证券账户
     */
    @Column(name = "SECU_EXT_ACCID", nullable = false)
    private String secuExtAccid;

    /**
     * 二级证券账户
     */
    @Column(name = "SECU_ACCID", nullable = false)
    private String secuAccid;

    /**
     * 交易对手
     */
    @Column(name = "PARTYID")
    private String partyid;

    /**
     * 二级资金账户(对方)
     */
    @Column(name = "CP_CASH_ACCID")
    private String cpCashAccid;

    /**
     * 二级证券账户(对方)
     */
    @Column(name = "CP_SECU_ACCID")
    private String cpSecuAccid;

    /**
     * 金融工具代码
     */
    @Column(name = "I_CODE", nullable = false)
    private String iCode;

    /**
     * 资产类型
     */
    @Column(name = "A_TYPE", nullable = false)
    private String aType;

    /**
     * 市场类型
     */
    @Column(name = "M_TYPE", nullable = false)
    private String mType;

    /**
     * 金融工具名称
     */
    @Column(name = "I_NAME", nullable = false)
    private String iName;

    /**
     * 交易价格
     */
    @Column(name = "ORDPRICE", nullable = false)
    private String ordprice;

    /**
     * 交易金额
     */
    @Column(name = "ORDAMOUNT", nullable = false)
    private String ordamount;

    /**
     * 交易费用
     */
    @Column(name = "TRDFEE", nullable = false)
    private String trdfee;

    /**
     * 结算费用
     */
    @Column(name = "SETFEE", nullable = false)
    private String setfee;

    /**
     * 清算速度
     */
    @Column(name = "SETDAYS", nullable = false)
    private String setdays;

    /**
     * 结算日期
     */
    @Column(name = "SETDATE", nullable = false)
    private String setdate;

    /**
     * 当时市场价（存手续费时记正负，返入为正，返出为负）
     */
    @Column(name = "THENMKTPRICE")
    private String thenmktprice;

    /**
     * 当时标的市场价（存尾随手续费时记正负，返入为正，返出为负）
     */
    @Column(name = "THENMKTPRICE_U")
    private String thenmktpriceU;

    /**
     * 交易状态,0:新建, 1:审批中, 2:, 3:, 4:审批拒绝, 5:审批通过, 6:, 7:成交确认, 8:, 9: 撤销,
     */
    @Column(name = "ORDSTATUS", nullable = false)
    private String ordstatus;

    /**
     * 错误代码
     */
    @Column(name = "ERRCODE", nullable = false)
    private String errcode;

    /**
     * 错误信息
     */
    @Column(name = "ERRINFO")
    private String errinfo;

    /**
     * 现券买卖的结算方式
     */
    @Column(name = "BND_SETTYPE")
    private String bndSettype;

    /**
     * 现券买卖的净价
     */
    @Column(name = "BND_NETPRICE")
    private String bndNetprice;

    /**
     * 现券买卖的总应计利息
     */
    @Column(name = "BND_AIAMOUNT")
    private String bndAiamount;

    /**
     * 备注
     */
    @Column(name = "REMARK")
    private String remark;

    /**
     * 本方保证方式
     */
    @Column(name = "RESERVETYPE")
    private String reservetype;

    /**
     * 对方保证方式
     */
    @Column(name = "CP_RESERVETYPE")
    private String cpReservetype;

    /**
     * 本方保证可否变更
     */
    @Column(name = "RESERVECHG")
    private String reservechg;

    /**
     * 对方保证可否变更
     */
    @Column(name = "CP_RESERVECHG")
    private String cpReservechg;

    /**
     * 本方保证总额
     */
    @Column(name = "RESERVEVALUE")
    private String reservevalue;

    /**
     * 对方保证总额
     */
    @Column(name = "CP_RESERVEVALUE")
    private String cpReservevalue;

    /**
     * 争议解决方式
     */
    @Column(name = "RESOLVE")
    private String resolve;

    /**
     * 组合交易号
     */
    @Column(name = "GRPID")
    private String grpid;

    /**
     * 撤补单的宿主委托日期
     */
    @Column(name = "REF_ORDDATE")
    private String refOrddate;

    /**
     * 撤补单的宿主委托序号
     */
    @Column(name = "REF_SYSORDID")
    private String refSysordid;

    /**
     * 忽略标记 1=忽略，其他=不忽略，主要是针对开放式回购的现券交易
     */
    @Column(name = "IGNORE_FLAG")
    private String ignoreFlag;

    /**
     * 交易执行市场
     */
    @Column(name = "EXE_MARKET")
    private String exeMarket;

    /**
     * 交易员
     */
    @Column(name = "TRADER")
    private String trader;

    /**
     * 交易员(对方)
     */
    @Column(name = "TRADER_CP")
    private String traderCp;

    /**
     * 组合交易的子组合交易号
     */
    @Column(name = "GRPID_SUB")
    private String grpidSub;

    /**
     * 承分销手续费返还方式:单返、折价、不返
     */
    @Column(name = "DIS_FEE_KIND")
    private String disFeeKind;

    /**
     * 承分销尾随手续费返还方式:单返、不返
     */
    @Column(name = "DIS_FEE_KIND_FOLLOW")
    private String disFeeKindFollow;

    /**
     * 对手户名
     */
    @Column(name = "PARTY_ACC_NAME")
    private String partyAccName;

    /**
     * 对手开户行
     */
    @Column(name = "PARTY_BANK_ACC_NAME")
    private String partyBankAccName;

    /**
     * 对手银行账号
     */
    @Column(name = "PARTY_BANK_ACC_CODE")
    private String partyBankAccCode;

    /**
     * 对手开户行号
     */
    @Column(name = "PARTY_BANK_CODE")
    private String partyBankCode;

    /**
     * 对手中债登托管账号
     */
    @Column(name = "PARTY_ZZDACCCODE")
    private String partyZzdacccode;

    /**
     * 合并后交易的委托序号，合并交易本身的SYSORDID、UNION_SYSORDID的值相同
     */
    @Column(name = "UNION_SYSORDID")
    private String unionSysordid;

    /**
     * 交易执行人
     */
    @Column(name = "EXECUTOR")
    private String executor;

    /**
     * 对方席位号，固定收益平台及大宗交易
     */
    @Column(name = "SEATNO_CP")
    private String seatnoCp;

    /**
     * 对手中债登托管账号户名
     */
    @Column(name = "PARTY_ZZDACCNAME")
    private String partyZzdaccname;

    /**
     * 关联方标志： 0=不是关联方， 1=是关联方
     */
    @Column(name = "RELATEDPARTY")
    private String relatedparty;

    /**
     * 成交方式：0=做市报价、1=双边报价、2=对话报价、3=其他
     */
    @Column(name = "DEALTYPE")
    private String dealtype;

    /**
     * 大宗交易要素的约定号
     */
    @Column(name = "AGREENUMBER")
    private String agreenumber;

    /**
     * 当时中债估值净价
     */
    @Column(name = "EVAL_NETPRICE")
    private String evalNetprice;

    @Column(name = "PARTYNAMETEMPORITY")
    private String partynametempority;

    @Column(name = "AGREEMENTTYPE")
    private String agreementtype;

    /**
     * 交易终止日期
     */
    @Column(name = "SETDATE_TERMINATE")
    private String setdateTerminate;

    /**
     * 交易终止时额外收付金额
     */
    @Column(name = "TERMINATE_AMOUNT")
    private String terminateAmount;

    @Column(name = "FSTSETDATESORT")
    private String fstsetdatesort;

    @Column(name = "ENDSETDATESORT")
    private String endsetdatesort;

    /**
     * 交易来源
     */
    @Column(name = "ORDSOURCE")
    private String ordsource;

    /**
     * 双边做市报价关联号
     */
    @Column(name = "BIDASKID")
    private String bidaskid;

    /**
     * 成交数量
     */
    @Column(name = "DEAL_COUNT")
    private String dealCount;

    /**
     * 成交交易所计算的应计利息，只在晚上清算时从BizSetDeal表更新过来
     */
    @Column(name = "DEAL_AIAMOUNT")
    private String dealAiamount;

    /**
     * 成交交易所计算的各项交易费用合计，只在晚上清算时从BizSetDeal表更新过来
     */
    @Column(name = "DEAL_FEE")
    private String dealFee;

    /**
     * 业绩分配关联交易号
     */
    @Column(name = "PERFOR_SYSORDID")
    private String perforSysordid;

    /**
     * 成交确认类别，0=无、1=自动成交、2=匹配成交、3=手工成交
     */
    @Column(name = "DEALED_CONFIRM_TYPE")
    private String dealedConfirmType;

    /**
     * 交易所执行金融工具代码
     */
    @Column(name = "I_CODE_EXH")
    private String iCodeExh;

    /**
     * 交易所执行资产类型
     */
    @Column(name = "A_TYPE_EXH")
    private String aTypeExh;

    /**
     * 交易所执行交易市场
     */
    @Column(name = "M_TYPE_EXH")
    private String mTypeExh;

    /**
     * 返还金额
     */
    @Column(name = "RETURN_AMOUNT")
    private String returnAmount;

    /**
     * 基金关联序号
     */
    @Column(name = "FUND_SYSORDID")
    private String fundSysordid;

    /**
     * 基金预计确认日期
     */
    @Column(name = "FUND_FINISHDATE")
    private String fundFinishdate;

    /**
     * 清算所估值
     */
    @Column(name = "EVAL_NETPRICE_QSS")
    private String evalNetpriceQss;

    /**
     * 交易价格水平
     */
    @Column(name = "ORDPRICELEVEL")
    private String ordpricelevel;

    /**
     * 开平标志:O-开；C-平；
     */
    @Column(name = "OCFLAG")
    private String ocflag;

    /**
     * 当次交易所占保证金。
     */
    @Column(name = "MARGINUSED")
    private String marginused;

    /**
     * 到期收益率
     */
    @Column(name = "BND_YTM", nullable = false)
    private String bndYtm;

    /**
     * 行权收益率
     */
    @Column(name = "BND_YTM_OE", nullable = false)
    private String bndYtmOe;

    /**
     * 支持的报价方式（对外报价时用）
     */
    @Column(name = "ORDERPRICETYPE")
    private String orderpricetype;

    /**
     * 当时中债估值收益率
     */
    @Column(name = "EVAL_YIELD")
    private String evalYield;

    /**
     * 审批通过时间
     */
    @Column(name = "APPROVED_TIME")
    private String approvedTime;

    /**
     * 中介机构
     */
    @Column(name = "INTERMEDIATION")
    private String intermediation;

    /**
     * 实际交易对手
     */
    @Column(name = "PARTYID_ACTUAL")
    private String partyidActual;

    /**
     * 中介费用
     */
    @Column(name = "INTERMEDIATION_FEE")
    private String intermediationFee;

    /**
     * 金融工具估值
     */
    @Column(name = "EVAL_NETPRICE_INSTRUMENT")
    private String evalNetpriceInstrument;

    /**
     * 0-原始状态 1-撤单请求中 2-修改组合类型请求中 3-撤单请求通过 4-撤单请求拒绝 5-修改组合类型请求通过 6-修改组合类型请求拒绝 7-改单请求中 8-改单请求通过 9-改单请求拒绝 10-修改完成(不适用于撤单请求)
     */
    @Column(name = "WITHDRAW_MODIFY_REQ_STATE")
    private String withdrawModifyReqState;

    /**
     * 交易撤改单请求时间
     */
    @Column(name = "WITHDRAW_MODIFY_REQ_TIME")
    private String withdrawModifyReqTime;

    /**
     * 交易复核人员
     */
    @Column(name = "REVIEWER")
    private String reviewer;

    /**
     * 审批信息
     */
    @Column(name = "APPROVE_INFO")
    private String approveInfo;

    /**
     * 8号文交易（或拆分后交易）关联的主交易SysOrdId
     */
    @Column(name = "TWL_SYSORDID")
    private String twlSysordid;

    /**
     * 券交收日期
     */
    @Column(name = "SETDATE_SECU")
    private String setdateSecu;

    /**
     * 资金交收日期
     */
    @Column(name = "SETDATE_CASH")
    private String setdateCash;

    /**
     * 交割币种
     */
    @Column(name = "DELIVERY_CURRENCY")
    private String deliveryCurrency;

    /**
     * 单位
     */
    @Column(name = "UNIT")
    private String unit;

    /**
     * 商品租借用,前一笔展期交易序号,为空表示当前这笔交易为第一笔
     */
    @Column(name = "PRE_SYSORDID")
    private String preSysordid;

    /**
     * 商品租借用,后一笔展期交易序号,为空表示当前这笔交易为最后一笔
     */
    @Column(name = "NEXT_SYSORDID")
    private String nextSysordid;

    /**
     * 含权债是否行权 1表示行权 0表示不行权
     */
    @Column(name = "ISEXERCISE")
    private String isexercise;

    /**
     * 基金预计持有到期日
     */
    @Column(name = "PRESETDATE_FUND")
    private String presetdateFund;

    /**
     * 流水号
     */
    @Column(name = "SERIALNUMBER")
    private String serialnumber;

    /**
     * 合同协议号
     */
    @Column(name = "PROTOCOLNUMBER")
    private String protocolnumber;

    /**
     * 报价数据来源 0 表示是xir录入 1表示 通过森浦数据生成
     */
    @Column(name = "BIDDDETAILSOURCE")
    private String bidddetailsource;

    /**
     * 招商证券合同协议号;对手方交易商(上交所固收执行平台协议回购业务)
     */
    @Column(name = "PROTOCOLGUID")
    private String protocolguid;

    /**
     * 清算所资金直连 清算所银行账号
     */
    @Column(name = "QSS_BANK_ACC_CODE")
    private String qssBankAccCode;

    @Column(name = "EXPECTRATE")
    private String expectrate;

    /**
     * 交易目的（现券交易）
     */
    @Column(name = "TRADE_PURPOSE")
    private String tradePurpose;

    /**
     * 固收直连对手方交易员编号
     */
    @Column(name = "TRADER_CP_FIX")
    private String traderCpFix;

    /**
     * 本方银行账号
     */
    @Column(name = "BANK_ACC_CODE")
    private String bankAccCode;

    /**
     * 提交审批人
     */
    @Column(name = "SUBMITUSER")
    private String submituser;

    /**
     * 防拆单交易面额
     */
    @Column(name = "UBREAKCOUNT")
    private String ubreakcount;

    /**
     * 防拆单交易金额
     */
    @Column(name = "UBREAKAMOUNT")
    private String ubreakamount;

    /**
     * 报价发起方，0-我方报价，1-对方报价
     */
    @Column(name = "QUOTESPONSOR")
    private String quotesponsor;

    /**
     * 首期指令号
     */
    @Column(name = "FST_INST_ID")
    private String fstInstId;

    /**
     * 到期指令号(到期或终止)
     */
    @Column(name = "END_INST_ID")
    private String endInstId;

    /**
     * 合同号
     */
    @Column(name = "CONTRACT_NO")
    private String contractNo;

    /**
     * 合同类型附件数量
     */
    @Column(name = "ATTACHMENT_COUNT")
    private String attachmentCount;

    /**
     * 创建时间
     */
    @Column(name = "CREATE_TIME")
    private String createTime;

    /**
     * 中证估值
     */
    @Column(name = "EVAL_NETPRICE_ZZ")
    private String evalNetpriceZz;

    /**
     * 成交净价金额
     */
    @Column(name = "DEAL_NETAMOUNT")
    private String dealNetamount;

    /**
     * 交易所执行时，成交单、执行单关联编号;对于期货，存在多条成交单的情形，用逗号隔开
     */
    @Column(name = "EXCHANGELINKEDID")
    private String exchangelinkedid;

    /**
     * 报价币种
     */
    @Column(name = "QUOTE_CURRENCY")
    private String quoteCurrency;

    /**
     * 汇率=结算币种/报价币
     */
    @Column(name = "EXCHANGE_RATE")
    private String exchangeRate;

    /**
     * 报价净价
     */
    @Column(name = "QUOTE_NET_PRICE")
    private String quoteNetPrice;

    /**
     * 本方户名
     */
    @Column(name = "SELF_ACC_NAME")
    private String selfAccName;

    /**
     * 本方开户行
     */
    @Column(name = "SELF_BANK_ACC_NAME")
    private String selfBankAccName;

    /**
     * 本方开户行号
     */
    @Column(name = "SELF_BANK_CODE")
    private String selfBankCode;

    /**
     * 本方中债登托管账号
     */
    @Column(name = "SELF_ZZDACCCODE")
    private String selfZzdacccode;

    /**
     * 本方中债登托管账号户名
     */
    @Column(name = "SELF_ZZDACCNAME")
    private String selfZzdaccname;

    /**
     * 中债行权估值
     */
    @Column(name = "EVAL_NETPRICE_OE")
    private String evalNetpriceOe;

    @Column(name = "BND_LEFTTERM")
    private String bndLeftterm;

    /**
     * 终止汇率
     */
    @Column(name = "TERMINATE_RATE")
    private String terminateRate;

    /**
     * 实时利率
     */
    @Column(name = "CURRENT_REPO_RATE")
    private String currentRepoRate;

    /**
     * 上一日回购利率
     */
    @Column(name = "LAST_DAY_REPO_RATE")
    private String lastDayRepoRate;

    /**
     * 交易数量
     */
    @Column(name = "ORDCOUNT", nullable = false)
    private String ordcount;

    /**
     * 是否审批通过撤至新建
     */
    @Column(name = "ISCONFIRMEDTONEW")
    private String isconfirmedtonew;

    /**
     * 报价类型 1:净价,2：到期收益率,3：含权收益率,4：全价
     */
    @Column(name = "ORDTYPE")
    private String ordtype;

    /**
     * 预付金账户
     */
    @Column(name = "PARTYACCOUNT")
    private String partyaccount;

    /**
     * 流动性头寸计划申报编号
     */
    @Column(name = "LMS_PLAN_ID")
    private String lmsPlanId;

    /**
     * 是否因为结算失败撤单
     */
    @Column(name = "ISWITHDRAWFORFAIL")
    private String iswithdrawforfail;

}
